﻿#include "kdpch.h"
#include "VertexArray.h"

#include "KuaDu/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLVertexArray.h"

namespace KD {

    Ref<VertexArray> VertexArray::Create()
    {
        switch (Renderer::GetAPI())
        {
            case RendererAPI::API::None: KD_CORE_ASSERT(false, "目前不支持RendererAPI::None！");
            case RendererAPI::API::OpenGL: return CreateRef<OpenGLVertexArray>();
        }

        KD_CORE_ASSERT(false, "未知的RendererAPI！");
        return nullptr;
    }

}